| Filename | (eval 1118)[/usr/share/perl5/CGI.pm:932] |
| Statements | Executed 50 statements in 429µs |
| Eval Invoked At | /usr/share/perl5/CGI.pm line 932 |
| Sibling evals | 1, 2, 3, 4, 5, 6 |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 3 | 2 | 98µs | 978µs | CGI::cookie |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # spent 978µs (98+880) within CGI::cookie which was called 3 times, avg 326µs/call:
# once (36µs+376µs) by C4::Search::History::get_from_session at line 201 of C4/Search/History.pm
# once (37µs+363µs) by C4::Auth::checkauth at line 775 of C4/Auth.pm
# once (25µs+140µs) by C4::Auth::checkauth at line 883 of C4/Auth.pm | ||||
| 2 | 5 | 40µs | 5 | 16µs | my($self,@p) = self_or_default(@_); # spent 16µs making 5 calls to CGI::self_or_default, avg 3µs/call |
| 3 | 5 | 120µs | 5 | 86µs | my($name,$value,$path,$domain,$secure,$expires,$httponly) = # spent 86µs making 5 calls to CGI::Util::rearrange, avg 17µs/call |
| 4 | rearrange([NAME,[VALUE,VALUES],PATH,DOMAIN,SECURE,EXPIRES,HTTPONLY],@p); | ||||
| 5 | |||||
| 6 | 5 | 181µs | require CGI::Cookie; | ||
| 7 | |||||
| 8 | # if no value is supplied, then we retrieve the | ||||
| 9 | # value of the cookie, if any. For efficiency, we cache the parsed | ||||
| 10 | # cookies in our state variables. | ||||
| 11 | 5 | 2µs | unless ( defined($value) ) { | ||
| 12 | 4 | 37µs | 4 | 1.21ms | $self->{'.cookies'} = CGI::Cookie->fetch; # spent 1.21ms making 4 calls to CGI::Cookie::fetch, avg 302µs/call |
| 13 | |||||
| 14 | # If no name is supplied, then retrieve the names of all our cookies. | ||||
| 15 | 4 | 3µs | return () unless $self->{'.cookies'}; | ||
| 16 | 4 | 1µs | return keys %{$self->{'.cookies'}} unless $name; | ||
| 17 | 4 | 16µs | 4 | 224µs | return () unless $self->{'.cookies'}->{$name}; # spent 224µs making 4 calls to CGI::Cookie::as_string, avg 56µs/call |
| 18 | 4 | 18µs | 4 | 6µs | return $self->{'.cookies'}->{$name}->value if defined($name) && $name ne ''; # spent 6µs making 4 calls to CGI::Cookie::value, avg 1µs/call |
| 19 | } | ||||
| 20 | |||||
| 21 | # If we get here, we're creating a new cookie | ||||
| 22 | 1 | 700ns | return undef unless defined($name) && $name ne ''; # this is an error | ||
| 23 | |||||
| 24 | 1 | 200ns | my @param; | ||
| 25 | 1 | 700ns | push(@param,'-name'=>$name); | ||
| 26 | 1 | 500ns | push(@param,'-value'=>$value); | ||
| 27 | 1 | 100ns | push(@param,'-domain'=>$domain) if $domain; | ||
| 28 | 1 | 100ns | push(@param,'-path'=>$path) if $path; | ||
| 29 | 1 | 200ns | push(@param,'-expires'=>$expires) if $expires; | ||
| 30 | 1 | 100ns | push(@param,'-secure'=>$secure) if $secure; | ||
| 31 | 1 | 800ns | push(@param,'-httponly'=>$httponly) if $httponly; | ||
| 32 | |||||
| 33 | 1 | 7µs | 1 | 97µs | return CGI::Cookie->new(@param); # spent 97µs making 1 call to CGI::Cookie::new |
| 34 | } | ||||
| 35 | |||||
| 36 | ; |